import React, { useEffect, useState, useRef } from 'react';
import { Mask } from '@/components/UiComponents'
import { View, Button } from '@tarojs/components'
const MaskGift = (props) => {
  const { visible = {}, onClose, dispatch, onOpen, hpFlag = '0', zIndex } = props
  const { show = false, } = visible
  if (show) {
    return <Mask
      show={show}
      style={{ zIndex: 10000000002 }}
      onClose={() => {
        onClose(false)
      }}
    >
      <View onClick={(e) => {
        e.stopPropagation();
        onClose()
      }} className={hpFlag === '1' ? 'maskGift_box maskGift_hp_box' : 'maskGift_box'}>
        <View onClick={(e) => { e.stopPropagation(); onOpen() }}>
          <View className='maskGift_box_title'></View>
          <View className='maskGift_box_image'>
            <View className='maskGift_box_imageDesc'>参与任务即可参与抽奖</View>
          </View>
        </View>
      </View>
    </Mask>
  }
  else {
    return null
  }
}
export default MaskGift